package cn.wolfcode.feign;

import cn.wolfcode.common.web.Result;
import cn.wolfcode.domain.PayVo;
import cn.wolfcode.domain.RefundVo;
import cn.wolfcode.feign.facback.AlipayFeignFacback;
import cn.wolfcode.feign.facback.ProductFeignFacback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name="pay-service",fallback = AlipayFeignFacback.class)
public interface AlipayFeignApi {
    @RequestMapping("/alipay/payOnline")
    public Result<String> payOnline(@RequestBody PayVo payVo);

    @RequestMapping("/alipay/rsaCheck")
    Result<Boolean> rsaCheck(@RequestParam Map<String, String> params);

    @RequestMapping("/alipay/refundOnline")
    Result<Boolean> refundOnline(@RequestBody RefundVo refundVo);
}
